package com.fhz.a2102shopjava.ui.dashboard;

import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.fhz.a2102shopjava.callback.ApiResponse;
import com.fhz.a2102shopjava.entity.Category;

import java.io.Closeable;
import java.util.List;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

@HiltViewModel
public class DashboardViewModel extends ViewModel {
    @Inject
    DashboardRepository mDashboardRepository;

    @Inject
    public DashboardViewModel(DashboardRepository dashboardRepository) {
        mDashboardRepository = dashboardRepository;
    }

    public LiveData<ApiResponse<List<Category>>> getCategory(int type){
        return mDashboardRepository.getCategory(type);
    }
}